Repository navigation
ci: image builds pull through a mirror instead of rate-limited Docker Hub - #5377
Merged
Merged
Conversation
miguel-heygen
marked this pull request as ready for review
October 9, 2026 22:33
Contributor
Edit accuracy: accurate 2061 (base branch 2061), smooth 1472 of thoseThe gate passes. Quarantined, measured but not gated (0) |
jrusso1020
approved these changes
Oct 9, 2026
jrusso1020
left a comment
Collaborator
There was a problem hiding this comment.
Approve at 301304ad. The mirror only affects how CI pulls Docker Hub images while building test images. Nothing is pushed or published through it, no credentials are involved, and nothing that was pinned before is pinned any less now.
Checked
- Scope. These three
setup-buildx-actionsteps are the only buildx setups in.github/workflows. All three build CI-only images:ci.ymlusespush: false.regression.ymlandfast-video-validation.ymluseload: trueand thendocker runthe local tag.- No workflow logs in to Docker Hub, so no credentials can reach the mirror. Release and publish workflows are untouched.
- What gets mirrored. Only the
docker.ioregistry. EveryFROMin the repo pullsnodefrom Docker Hub (Dockerfile.test,Dockerfile.render,gcp-cloud-run/Dockerfile), and nothing pulls from another registry. When the mirror misses, BuildKit falls back to Docker Hub. - Pinning. No base image was pinned by digest before this PR. Both
node:22.23.3-bookworm-slimand the BuildKit image were tag references, andmoby/buildkit:buildx-stable-1was already the action's default. Moving that same tag tomirror.gcr.ioadds no floating reference. - Digests match. I queried both registries directly at review time, and each tag resolves to the same manifest digest on both:
library/node:22.23.3-bookworm-slim→sha256:c3de60bf…978392;moby/buildkit:buildx-stable-1→sha256:cec9f139…2e3dea.- Layers are content-addressed against that manifest, so the mirror can serve a given digest's content only as it is.
- Trust change. Tag resolution now also trusts Google's documented Docker Hub cache, alongside Docker Hub itself. That's a reasonable trade for CI-only, unpublished images.
- The CI run uses it. The shard-10 log shows
buildx create … --driver-opt image=mirror.gcr.io/moby/buildkit:buildx-stable-1, the pull frommirror.gcr.io, andmirrors = ['mirror.gcr.io']in the loadedbuildkitd.toml. All 10 shards passed in the first regression run at this head. The extra buildkitd entitlement flags in that log are the action's defaults and are the same as on main. - Self-filter. Adding
.github/workflows/regression.ymlto the regression change filter is right. Before, a PR that edited the shards' own workflow skipped those shards.
Nits (none blocking)
buildx-stable-1is a floating tag on either registry. Pinning it asmirror.gcr.io/moby/buildkit:buildx-stable-1@sha256:…would make the builder reproducible. That's separate hardening, not something this PR loosened.- A cache can lag a tag that gets re-pushed. Official
nodeimages are rebuilt under the same tag for Debian updates, so the mirror may briefly serve the previous digest. The same digest stays reachable from Docker Hub, and the GHA build cache keys follow whichever digest comes back, so it's harmless.
This approval waits for the required checks at this head.
— Rames
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
The regression shards, the BeginFrame image contract and the fast video validation build their Docker images with buildx on GitHub-hosted runners. Those runners pull
moby/buildkitandnode:22.23.3-bookworm-slimfrom Docker Hub anonymously, and Docker Hub has started answering with rate limits:That turns shards red on main and on every PR, at random.
The three
docker/setup-buildx-actionsteps now:mirror.gcr.io/moby/buildkit:buildx-stable-1instead of Docker Hub;docker.ioimages throughmirror.gcr.io, Google's public Docker Hub mirror. BuildKit falls back to Docker Hub if the mirror misses.The regression workflow's change filter now also matches
.github/workflows/regression.yml, asci.ymlalready lists itself for the BeginFrame contract job. Before, an edit to the regression workflow skipped the very shards it changed.The Dockerfiles are unchanged, so anyone building them locally pulls exactly as before. The two
docker runsteps run the image the job just built and pull nothing.Checked
mirror.gcr.ioserves both images:docker buildx imagetools inspectresolvesmirror.gcr.io/moby/buildkit:buildx-stable-1andmirror.gcr.io/library/node:22.23.3-bookworm-slim.setup-buildx-actionaccepts bothdriver-optsandbuildkitd-config-inline.actionlintreports the same findings on the three workflows before and after.mirror.gcr.io/moby/buildkit:buildx-stable-1(the job log shows the pull) with the mirror config loaded, and no shard hit a 429. BuildKit logs image names asdocker.io/...whichever host answers, so the routing was checked on a Linux box with a debug builder and this exact config, buildingFROM node:22.23.3-bookworm-slimwith--no-cache: the manifest request and every layer went tomirror.gcr.io/v2/library/node/..., and Docker Hub got no requests. With the mirror pointed at a bad path, BuildKit loggedtrying next host after status: 404 Not Found, pulled from Docker Hub and the build succeeded.Small on purpose: one CI setting in three places, so nothing else can carry it.